package com.zjitc.service;

import com.zjitc.common.ServerResponse;
import com.zjitc.pojo.Car;
import com.zjitc.pojo.Caritem;

import java.util.List;

/**
 * Create By IntelliJ IDEA
 *
 * @author: myq
 * @create-Time: 2017/11/20  17:07
 */
public interface CarService {

  /**
   * 添加到购物车
   * @param uid
   * @param count
   * @param pid
   */
  void add2car(String uid, int count, String pid);

  /**
   * 查找购物车中的商品
   * @param uid
   * @return
   */
  List<Caritem> findAll(String uid);

  /**
   * 清空购物车
   * @param uid
   * @return
   */
  int deleteAll(String uid);

  /**
   * 删除购物车中某商品
   * @param pid
   * @param uid
   * @return
   */
  ServerResponse<Car> deletesingle(String pid, String uid);

}
